/**
 * Created by udi on 2016/11/28.
 */


require(["jv", "vue"], function () {
  var Vue = require("vue");

  Vue.config.ignoredElements = ["kv", "k", "v"];

  if (!location.map.token) {
    jv.setToken();
  }


  var bindVue = function (data) {

    var vm = new Vue({
      el: '#app',
      data: {items: data || []},
      methods: {
        getImg: function (img) {
          var index = img.indexOf("/media/");

          return img.slice(0, index) + "/media/small/" + img.slice(index + 7) + "_100x100.jpg";
        }
      }
    });
  }

  jv.post("/store/list?communityId=" + location.map.communityId + "&fuwuId=" + location.map.fuwuId, bindVue);
});
